<?php

/**
 * Description of RequestLogger
 *
 * @author pahhan
 */
class Log_RequestLogger extends Kohana_Log_File
{
    public function write(array $server = array())
	{
		if( empty($server) ) $server = $_SERVER;

		$filename = $this->_directory.date('Y-m-d').'.txt';

        $message = sprintf("\n%s: %s\n%s",
                date('H:i:s'),
                $server['REQUEST_URI'],
                file_get_contents('php://input'));


        file_put_contents($filename, $message, FILE_APPEND);

	}


}

